const AV = require('./libs/av-core-min.js');
const adapters = require('./libs/leancloud-adapters-weapp.js');
AV.setAdapters(adapters);
// const WXBizDataCrypt = require('utils/RdWXBizDataCrypt.js');
// wx.WXBizDataCrypt = WXBizDataCrypt
// wx.yuntin_AppId = 'wx65128d218158d2c7'
// wx.yuntin_AppSecret = '79ab06dcb91cabdc12fbe4bf5535655c'
AV.init({
  // appId: 'BvjcpX3kNB69xP8N0fHxDQav-gzGzoHsz',
  // appKey: 'IQoz39EYbiA8jm8KbGCp5tL1',
  appId: '1uMy4DAwIHDT9w7bjuJYqLsf-gzGzoHsz',
  appKey: 'vNhVxtLDkgYjVXdhJiIjtqwF',
  // 请将 xxx.example.com 替换为你的应用绑定的自定义 API 域名
  // serverURLs: "https://leancloud.celiangyuan.com",
  serverURLs: "https://1umy4daw.lc-cn-n1-shared.com",
});
wx.AV = AV
// app.js
App({
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  globalData: {
    userInfo: null
  }
})